<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <script>
        // 这是一个js函数，可以在页面中引用
        function func() {
            document.getElementById('title').style.fontSize='50px';
            document.getElementById('title').style.color='red';
        }

    </script>
<!--    引入外部js代码-->
    <script type="text/javascript" src="./js/demo_js_01.js"></script>
</head>

<body>

<h2 id="title" >鹅鹅鹅</h2>
<p>鹅，鹅，鹅，</p>
<p><span id="value_001">曲项</span>向天歌。</p>
<p>白毛浮绿水，</p>
<p>红掌拨<span id="water">清波</span>。</p>

<!--js代码写到body中-->
<script>
    document.getElementById('value_001').style.fontSize='30px';
    func();
    change_color();
</script>
<!--
<script>
        document.getElementById('title').style.fontSize='50px';
        document.getElementById('title').style.color='red';
</script>
-->

</body>

</html>